﻿using System.Web.Mvc;
using log4net;
using LogManager = log4net.LogManager;

namespace Cnm.Mvc.Admin.Controllers
{
    public partial class SecurityController : BaseAdminController
    {
        #region Fields

        private readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

        #endregion

        #region Constructors

        #endregion

        #region Methods

        public ActionResult AccessDenied(string pageUrl)
        {
            logger.Info(string.Format("Access denied to anonymous request on {0}", pageUrl));
            return View();
        }

        public ActionResult Permissions()
        {
            return View();
        }

        [HttpPost, ActionName("Permissions")]
        public ActionResult PermissionsSave(FormCollection form)
        {
            return RedirectToAction("Permissions");
        }

        #endregion
    }
}